import 'package:flutter/material.dart';
import 'package:flutter3x/model/post.dart';


class PostShowDemo extends StatelessWidget {
  final Post  posta;
  const PostShowDemo({super.key,required this.posta});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
         title: Text(posta.title),
         elevation: 0,
      ),
      body: Column(
        children: [
          Image.network(posta.imageUrl),
          Container(
            padding: const EdgeInsets.all(32),
            width: double.infinity,
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                Text(posta.title,style: Theme.of(context).textTheme.titleLarge,),
                Text(posta.author,style: Theme.of(context).textTheme.titleSmall,),
                const SizedBox(height: 20,),
                Text(posta.description,style: Theme.of(context).textTheme.bodyMedium,),
              ],
            ),
          )
        ],
      ),
    );
  }
}